import { SYSTEM } from '../api'
import { METHOD, request } from '@/utils/request'

/* 角色相关 */
// 新增
export async function addRole(params) {
    return request(`${SYSTEM}/role/save`, METHOD.POST, params)
}
// 删除
export async function delRole(params) {
    return request(`${SYSTEM}/role/del`, METHOD.POST, params)
}
// 修改
export async function updateRole(params) {
    return request(`${SYSTEM}/role/update`, METHOD.POST, params)
}
// 查询单个角色详情
export async function getRole(params) {
    return request(`${SYSTEM}/role/get`, METHOD.POST, params)
}
// 查询列表
export async function getRoleList(params) {
    return request(`${SYSTEM}/role/page`, METHOD.POST, params)
}
// 查询所有
export async function getAllRole(params) {
    return request(`${SYSTEM}/role/list`, METHOD.POST, params)
}

export default {
    addRole,
    delRole,
    updateRole,
    getRole,
    getRoleList,
}